package com.linkdood.app.dto;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 功能：外部敏感信息配置
 *
 * @author gls
 * @date 2021/8/4
 */

@Data
@Slf4j
@NoArgsConstructor
public class ExtConfigDTO {

    private Database database;
    private Ddio ddio;

    @JSONField(name = "AID")
    private String aid;

    public ExtConfigDTO(boolean init) {
        if (init) {
            this.ddio = new Ddio();
            this.database = new Database();
        }
    }

    @Data
    public static class Database {
        private String username;
        private String pwd;
    }

    @Data
    public static class Ddio {
        private String appID;
        private String appSecret;
    }
}

